package com.hang.jvm.risc;

import com.hang.jvm.risc.v2_memory_bus.exception.InvalidRegisterException;
import com.hang.jvm.risc.v2_memory_bus.exception.LoadAccessFaultException;

import java.math.BigInteger;

public interface CPU {

    long fetch() throws LoadAccessFaultException;

    long execute(long inst) throws LoadAccessFaultException;

    void setPc(long nextPc);

    long load(long addr, int size) throws LoadAccessFaultException;

    void store(long addr, int size, long value) throws LoadAccessFaultException;

    long reg(String r) throws InvalidRegisterException;

}
